package v7_test;

import cn.egame.common.cache.ICacheClient;
import cn.egame.common.cache.SCacheClient;
import cn.egame.common.util.Utils;

public class TestRedis {
    private static ICacheClient getCacheList() {
        return SCacheClient.getInstance("egame_list");
    }

    private static ICacheClient getCache() {
        return SCacheClient.getInstance("egame");
    }
    public static void main(String[] args) {
        Utils.initLog4j();
        Object value = new Object();
        String cacheKey="JAVA-advDetailById:9095";
        value = getCache().get(cacheKey);
        if (value == null) {
            value = getCacheList().get(cacheKey);
        }
        System.out.println("/*======================================*/");
        System.out.println("    缓存的key为：       " + cacheKey);
        System.out.println("    缓存的value为：     " + value);
        System.out.println("/*======================================*/");
        System.exit(0);
    }
}
